package com.five.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {
    private Integer pageNum = 1;
    private Integer pageSize = 10;

    // 计算startIndex
    public Integer getStartIndex() {
        return (this.pageNum - 1) * this.pageSize;
    }
}
